﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq.Expressions;
using System.Web.Http;
using WMSNet.Core.Infrastructure.Api;
using WMSNet.Core.Service;
using WMSNet.Model.Models;


namespace WMSNet.Core.Api
{
    [ExceptionHandling]
    public class ClientController:BaseApiController
    {
        IClientService _clientService;

        public ClientController(IClientService clientService)
        {
            this._clientService = clientService;
        }

        [HttpGet]
        public Client CreateClient(string Name,int Number,string Code)
        {
            return _clientService.Create(Name, Number, Code);
        }

        [HttpGet]
        public Client GetClient(string Name)
        {
            return _clientService.GetByName(Name);
        }
    }
}
